Skip to content

feat: add NAT hole punching protocol and relay v2 reservation renewal & multi-hop support #782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sujalsalekar
Copy link

Description

1. NAT Traversal and Hole Punching

  • Adds a new HolePunchService implementing the /libp2p/holepunch/1.0.0 protocol.
  • Lays the groundwork for advanced NAT traversal, enabling peers behind NATs to establish direct connections using coordinated hole punching.
  • The service is ready for integration with AutoNAT and relay-based coordination.

2. Relay v2 Upgrades

  • Implements client-side reservation storage and automatic renewal in CircuitV2Transport, ensuring relay reservations are refreshed before expiration.
  • Adds support for multi-hop relays, allowing connections to be established through a chain of relay nodes when direct or single-hop relay connections are not possible.
  • Updates relay selection and dialing logic to handle multi-hop relay addresses.

@seetadev
Copy link
Contributor

seetadev commented Jul 20, 2025

@sujalsalekar : HI Sujal. Wish if you could discuss with @Winter-Soren before proceeding on this PR. We do have another PR ready to be merged: please visit #668

It would be better if you discuss, work out a plan and contribute with @Winter-Soren in hole punching interop.

It would be wonderful if you could also meet us at maintainer meetings or at discord before picking up the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants